All headings (h1 through h6) automatically get id attributes based on their text content using the text_to_anchor() function:
- Removes special characters
- Converts to lowercase
- Replaces spaces with hyphens
- Enables direct linking via
#anchor-slug
- Powers TOC navigation with smooth scrolling (scroll margin 7rem for navbar offset)